package com.datamation.swadeshi.adapter;

import java.util.ArrayList;

import android.content.Context;
import android.transition.Fade;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.datamation.swadeshi.R;
import com.datamation.swadeshi.control.data.DebtorDS;
import com.datamation.swadeshi.control.data.LoadingCustomDS;
import com.datamation.swadeshi.control.data.fDaynPrdDetDS;
import com.datamation.swadeshi.model.FDayExpDet;
import com.datamation.swadeshi.model.fDaynPrdDet;

public class SalesExpenseGridDetails extends ArrayAdapter<FDayExpDet>{
	Context context;
	ArrayList<FDayExpDet> list;
	public SalesExpenseGridDetails(Context context,ArrayList<FDayExpDet> list) {
		super(context, R.layout.row_nonproduct_det, list);
		this.context = context;
		this.list = list;
		// TODO Auto-generated constructor stub
	}
	@Override
	public View getView(final int position, final View convertView, final ViewGroup parent) {
		
		LayoutInflater inflater = null;
		View row = null;
		
		inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		row = inflater.inflate(R.layout.row_nonproduct_det, parent, false);
		
		TextView Itemname = (TextView) row.findViewById(R.id.row_nonprd_refno);
		TextView Itemcode = (TextView) row.findViewById(R.id.row_nonprd_reason);
		TextView _id = (TextView) row.findViewById(R.id._id);
		
	
		fDaynPrdDetDS ds =new fDaynPrdDetDS(getContext());
		DebtorDS deb =new DebtorDS(getContext());

		Itemname.setText(list.get(position).getEXPDET_EXPCODE());
		Itemcode.setText(list.get(position).getEXPDET_AMOUNT());
		//_id.setText(list.get(position).getNONPRDDET_ID());
		
		return row;
	}

}
